<!DOCTYPE html>
<html lang="en" ng-app="myApp">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/static/css/style.css">
    <link rel="stylesheet" type="text/css" href="/static/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/static/lib/editor.md/css/editormd.css">
    <link rel="stylesheet" type="text/css" href="/static/lib/editor.md/css/editormd.preview.css" />
</head>
<body>
<div class="write" ng-controller="mdController">
    <div class="write_nav">
        <div class="goHome">
            <a href="/">Hello Word</a>
        </div>
        <div class="new_nootBook" ng-click="addNote=!addNote">
            <a href="#" class="creat_note">
                <i class="fa fa-plus"></i>
                新建分类
                <img src="/static/image/tiny.gif" style="display: inline;width: 17px;vertical-align: middle">
            </a>
            <div class="new-notebook-form"  ng-show="addNote" ng-click="$event.stopPropagation();">
                <div class="create-notebook-form">
                    <input type="text" ng-model="noteName" placeholder="请输入文集名" class="notebook-input">
                    <a href="javascript:void (0)" class="cancel" ng-click="addNote=false">取消</a>
                    <input type="submit" value="提交"  class="submit" ng-click="newNotebook(noteName)">
                </div>
            </div>
        </div>
        <ul class="nav_list">
            <li ng-repeat="item in typeList">
                <a class="notebook-name" ng-class="{active:count==$index}" href="javascript:void(0)" ng-click="settingShow($index,item.id)">
                    <span class="t_name">[[item.name]]</span>
                </a>
                <a class="edit_notebook" ng-show="count==$index" ng-click="settingCount=!settingCount">
                    <i class="fa fa-gear"></i>
                </a>
                <ul class="dropdown-menu" id="dropdown" ng-show="settingCount && count==$index">
                    <li ng-click="modifyTypeName(item)">
                        <a>
                            <i class="fa fa-pencil-square-o"></i>修改分类名
                        </a>
                    </li>
                    <li class="dividerOOO"></li>
                    <li ng-click="deleteType(item)">
                        <a>
                            <i class="fa fa-trash-o"></i>删除分类
                        </a>
                    </li>
                </ul>
            </li>
        </ul>
        <div class="commercial">
            <a class="btn">
                <i class="fa fa-trash"></i>
                <span style="vertical-align: middle;">回收站</span>
            </a>
        </div>
    </div>
    <div class="write_middle">
        <div class="notes-list">
            <div class="new_note">
                <a href="javascript:void(0)" class="new_note_link" ng-click="creatMD()">
                    <i style="vertical-align:middle" class="icon fa fa-plus-circle"></i>
                    <span class="win-text">新建文章</span>
                </a>
            </div>
        </div>
        <ul class="middle_list">
            <li class="one-note"  ng-class="{active:mdCount=='creat'}" ng-show="mdCount=='creat'">
                <i class="fa fa-file icon-note" aria-hidden="true"></i>
                <p class="abbreviate">待定</p>
                <!--<p class="wordage win-text">字数：0</p>-->
                <a href="javascript:void (0)" class="note-title">[[noteBook.title]]</a>
                <a href="javascript:void (0)" class="share-note">
                    <!--<i class="fa fa-gear"></i>-->
                </a>
            </li>
            <li class="one-note" ng-repeat="item in typeNode" ng-class="{active:mdCount==$index}" ng-click="toogleNote($index,item.id)">
                <i class="fa fa-file icon-note" aria-hidden="true"></i>
                <p class="abbreviate">[[item.content]]</p>
                <!--<p class="wordage win-text">字数：0</p>-->
                <a href="javascript:void (0)" class="note-title">[[item.title]]</a>
                <a href="javascript:void (0)" class="share-note" ng-click="writeSetting($event)" ng-show="mdCount==$index">
                    <i class="fa fa-gear"></i>
                </a>
                <ul class="dropdown-menu" ng-show="writeCount && mdCount==$index">
                    <li>
                        <a>
                            <i class="fa fa-pencil-square-o"></i>发布文章
                        </a>
                    </li>
                    <li class="dividerOOO"></li>
                    <li>
                        <a ng-click="deleteWrite(item)">
                            <i class="fa fa-trash-o"></i>删除文章
                        </a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="write_main">
        <div class="no-notes" style="height: 100%" ng-show="!noteForm">
            <span>Hello Word</span>
        </div>
        <form class="note_form" ng-show="noteForm">
            <input class="title"  ng-model="noteBook.title" type="text" name="title">
            <div class="h_markdown">
                <div id="write" style="width: 100%;margin-bottom: 0;border-bottom: none;border-left: none">
                    <textarea style="display: none">###Hello word</textarea>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="/static/lib/jquery/dist/jquery.js"></script>
<script src="/static/lib/angular/angular.js"></script>
<script src="/static/js/controller.js"></script>
<script src="/static/lib/editor.md/editormd.js"></script>
<script>
    (function () { //监听屏幕变化
        let winHeight = $(window).height();
        $('.write').height(winHeight+'px')
        $('.h_markdown').height(winHeight-72+'px')

        $(window).resize(function () {
            let winHeight = $(window).height();
            $('.write').height(winHeight)
            $('.h_markdown').height(winHeight-72+'px')
        })
    })();
</script>
</body>
</html>